<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <title>第三方支付</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!-- Le styles -->
    <link href="/css/bootstrap.min.css" rel="stylesheet">

    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
</head>

<body>

    <div class="navbar">
        <div class="navbar-inner">
            <div class="container">
                <a class="brand" href="\">第三方支付</a>
                <div class="nav-collapse pull-right">
                </div>

            </div>
        </div>
    </div>

    <div class="container">
        <p style="font-size: 50px;margin:100px">充值成功</p>
        <p id="time">
            倒计时10s后返回商城，或 <a href="/">立即返回</a>
        </p>
    </div>

    <!-- <script src="/js/bootstrap-datepicker.js"></script> -->
    <script type="text/javascript">
        var t = 10;
        setInterval("refer()", 1000);
        function refer() {
            if (t == 0) {
                location.href = "http://127.0.0.1:8000";
            }
            $("#time").html("倒计时" + t + "s后返回商城，或  <a href='http://127.0.0.1:8000'>立即返回</a> ");
            t--;
        } 
    </script>

    <script src="/js/jquery-1.7.2.min.js"></script>
    <script src="/js/bootstrap-alert.js"></script>
    <!-- <script src="/js/bootstrap-modal.js"></script> -->
    <script>
        function getRandomString(len) {
            let _charStr = 'abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789',
                min = 0,
                max = _charStr.length - 1,
                _str = '';                    //定义随机字符串 变量
            //判断是否指定长度，否则默认长度为15
            len = len || 15;
            //循环生成字符串
            for (var i = 0, index; i < len; i++) {
                index = (function (randomIndexFunc, i) {
                    return randomIndexFunc(min, max, i, randomIndexFunc);
                })(function (min, max, i, _self) {
                    let indexTemp = Math.floor(Math.random() * (max - min + 1) + min),
                        numStart = _charStr.length - 10;
                    if (i == 0 && indexTemp >= numStart) {
                        indexTemp = _self(min, max, i, _self);
                    }
                    return indexTemp;
                }, i);
                _str += _charStr[index];
            }
            return _str;
        }
        if (!document.cookie) {
            document.cookie = getRandomString(20)
        }
    </script>

</body>

</html>
